from django.shortcuts import render
from rest_framework import viewsets
from .models import Homework, Question
from .serializers import HomeworkSerializer, QuestionSerializer

class HomeworkViewSet(viewsets.ModelViewSet):
    queryset = Homework.objects.all()
    serializer_class = HomeworkSerializer


class QuestionViewSet(viewsets.ModelViewSet):
    queryset = Question.objects.all()
    serializer_class = QuestionSerializer
